<?php

namespace app\admin\model\activity;

use think\Model;
use think\Db;
use app\admin\model\activity\Activitylist;

class Rankslist extends Model
{

    

    

    // 表名
    protected $name = 'event_guess_teams';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [

    ];
    
    public function ranklist(){
        $ranks = Db::name('events_guess')->order('id desc')->select();
        // echo "<pre>";
        // print_r($ranks);die;
        return $ranks;

    }

    public function activitylist()

    {

        return $this->belongsTo('\app\admin\model\activity\Activitylist', 'event_id', 'id', [], 'LEFT')->setEagerlyType(0);

    }
    







}
